cmake: Add support for custom protoc executable via OR_TOOLS_PROTOC_EXECUTABLE#4679
Merged
Mizux merged 1 commit intogoogle:mainfrom Jun 11, 2025
Merged
cmake: Add support for custom protoc executable via OR_TOOLS_PROTOC_EXECUTABLE#4679Mizux merged 1 commit intogoogle:mainfrom
Mizux merged 1 commit intogoogle:mainfrom
Conversation
Contributor
Author
|
Building OR-Tools via Yocto, I need to specify where to find the protoc host binary |
Collaborator
|
two things:
note: git grep -in "if(DEFINED ENV" **/*.cmake
cmake/FindCPLEX.cmake:54: if(DEFINED ENV{UNIX_CPLEX_DIR})
cmake/FindCPLEX.cmake:56: elseif(DEFINED ENV{CPLEX_ROOT})
cmake/FindGLPK.cmake:69:if(DEFINED ENV{GLPK_ROOT})
cmake/FindJulia.cmake:46:if(DEFINED ENV{JULIA_BINDIR})
cmake/FindJulia.cmake:52:if(DEFINED ENV{JULIA_BINDIR})
cmake/dotnet.cmake:343:if(DEFINED ENV{DOTNET_SNK})
cmake/utils.cmake:39: if(DEFINED ENV{OR_TOOLS_MAJOR} AND DEFINED ENV{OR_TOOLS_MINOR})
cmake/utils.cmake:55: if(DEFINED ENV{OR_TOOLS_PATCH}) |
Contributor
Author
Yes will do
The ENV you're pointing is for FindPackage CMake Module it could be a good hint to find some places where to look for a specific package. |
…XECUTABLE Allow users to specify a custom protoc executable by setting the OR_TOOLS_PROTOC_EXECUTABLE variable, which takes precedence over the default cross-compilation and system protoc detection logic. Signed-off-by: Clément Péron <peron.clem@gmail.com>
be40718 to
2246db2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow users to specify a custom protoc executable by setting the OR_TOOLS_PROTOC_EXECUTABLE variable, which takes precedence over the default cross-compilation and system protoc detection logic.